<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRulesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('rules', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->timestamps();
            $table->string('rule')->nullable(false)->comment('路由规则');
            $table->string('title')->nullable(false)->comment('路由描述');
            $table->string('group_name')->nullable(true)->comment('分组名称');

//            $table->

        });

        DB::statement("ALTER TABLE `rules` COMMENT='路由权限表'");//表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('rules');
    }
}
